package com.ebid.templates.twenty;

import com.ebid.templates.utils.ParameterUtils;

import java.text.MessageFormat;

public class ContractPerformance {

    private static String contractPerformance ="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"+
            "<contractPerformance> \n" +
            "    <bidSectionCode>{0}</bidSectionCode>\n" +
            "    <unifiedDealCode>{1}</unifiedDealCode>\n" +
            "    <tendererName>{2}</tendererName>\n" +
            "    <tenderCode>{3}</tenderCode>\n" +
            "    <bidderName>{4}</bidderName>\n" +
            "    <bidderCode>{5}</bidderCode>\n" +
            "    <contractPrice>{6}</contractPrice>\n" +
            "    <settlePrice>{7}</settlePrice>\n" +
            "    <priceCurrency>{8}</priceCurrency>\n" +
            "    <priceUnit>{9}</priceUnit>\n" +
            "    <contractContent>{10}</contractContent>\n" +
            "    <limiteTime>{11}</limiteTime>\n" +
            "    <qualityRequire>{12}</qualityRequire>\n" +
            "    <performChangeContent>{13}</performChangeContent>\n" +
            "    <finishTime>{14}</finishTime>\n" +
            "    <actuallyPeriod>{15}</actuallyPeriod>\n" +
            "    <performInfo>{16}</performInfo>\n" +
            "    <submitTime>{17}</submitTime>\n" +
            "    <contractSignTime>{18}</contractSignTime>\n" +
            "    <attachmentSetCode>{19}</attachmentSetCode>\n" +
            "    <platformCode>{20}</platformCode>\n" +
            "    <pubServicePlatCode>{21}</pubServicePlatCode>\n" +
            "    <dataTimeStamp>{22}</dataTimeStamp>\n" +
            "</contractPerformance>";

    public static void setContractPerformance(String contractPerformance,String s0,String s1,String s2,String s3,String s4,String s5,String s6,String s7,String s8,String s9,String s10
            ,String s11,String s12,String s13,String s14,String s15,String s16,String s17,String s18,String s19,String s20
            ,String s21,String s22) {
        ContractPerformance.contractPerformance = MessageFormat.format(contractPerformance,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,
                s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22);
    }
    public static void setContractPerformance(){
        setContractPerformance(contractPerformance, ParameterUtils.get("bidSectionCode"),
                                                    ParameterUtils.get("unifiedDealCode"),
                                                    ParameterUtils.get("tendererName"),
                                                    ParameterUtils.get("tenderCode"),
                                                    ParameterUtils.get("bidderName"),
                                                    ParameterUtils.get("bidderCode"),
                                                    ParameterUtils.get("contractPrice"),
                                                    ParameterUtils.get("settlePrice"),
                                                    ParameterUtils.get("priceCurrency"),
                                                    ParameterUtils.get("priceUnit"),
                                                    ParameterUtils.get("contractContent"),
                                                    ParameterUtils.get("limiteTime"),
                                                    ParameterUtils.get("qualityRequire"),
                                                    ParameterUtils.get("performChangeContent"),
                                                    ParameterUtils.get("finishTime"),
                                                    ParameterUtils.get("actuallyPeriod"),
                                                    ParameterUtils.get("performInfo"),
                                                    ParameterUtils.get("submitTime"),
                                                    ParameterUtils.get("contractSignTime"),
                                                    ParameterUtils.get("attachmentSetCode"),
                                                    ParameterUtils.get("platformCode"),
                                                    ParameterUtils.get("pubServicePlatCode"),
                                                    ParameterUtils.get("dataTimeStamp")
                );
    }

//    public static void main(String[] args) {
//        setContractPerformance();
//        System.out.println(contractPerformance);
//    }
}
